/*
 * SubjectsGetList.java
 *
 * Created on November 16, 2008, 8:14 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package jollylengkono.skripsi.Subjects.action;

import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jollylengkono.skripsi.dao.SubjectsDao;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author JollkY
 */
public class SubjectsGetList extends Action {
    
    /** Creates a new instance of SubjectsGetList */
    public SubjectsGetList() {
    }
    
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) {
        List subjects = new ArrayList();
        subjects = new SubjectsDao().getList();
        request.setAttribute("subjects", subjects);
        return mapping.findForward("success");
    }
    
}
